using System;
using System.Collections.Generic;

namespace MathService
{
    public class ActionList<T> : List<Action<T>>
    {
        public ActionList() { }
        public ActionList(int capacity) : base(capacity) { }
        public ActionList(IEnumerable<Action<T>> collection) : base(collection) { }

        public void Invoke(T t) { ForEach(a => a.Invoke(t)); }
    }

    public class ActionList<T1, T2> : List<Action<T1, T2>>
    {
        public ActionList() { }
        public ActionList(int capacity) : base(capacity) { }
        public ActionList(IEnumerable<Action<T1, T2>> collection) : base(collection) { }

        public void Invoke(T1 t1, T2 t2) { ForEach(a => a.Invoke(t1, t2)); }
    }

    public class ActionList<T1, T2, T3> : List<Action<T1, T2, T3>>
    {
        public ActionList() { }
        public ActionList(int capacity) : base(capacity) { }
        public ActionList(IEnumerable<Action<T1, T2, T3>> collection) : base(collection) { }

        public void Invoke(T1 t1, T2 t2, T3 t3) { ForEach(a => a.Invoke(t1, t2, t3)); }
    }
}